const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
const axisProps = require('../tw-lib-base/chart/axis-props')
const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  ...axisProps,
  ...datazoomProps,
  ...tooltipProps,
  yAxisNumber: {
    type: String,
    default: '2',
    name: 'Y轴数',
    filedType: 'select',
    options: [
      {
        name: '1条',
        value: '1'
      },
      {
        name: '2条',
        value: '2'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },
  // 堆叠数据
  lineName: {
    type: String,
    default: '王飞虎',
    name: '线图数据',
    nameTip: '英文逗号分隔，在此列表为线图',
    filedType: 'string'
  },
  leftType: {
    type: String,
    default: 'bar',
    name: '左Y轴对应图表类型',
    filedType: 'select',
    options: [
      {
        name: '折线图',
        value: 'line'
      },
      {
        name: '柱状图',
        value: 'bar'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },
  rightType: {
    type: String,
    default: 'line',
    name: '右Y轴对应图表类型',
    filedType: 'select',
    options: [
      {
        name: '折线图',
        value: 'line'
      },
      {
        name: '柱状图',
        value: 'bar'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },
  isSmooth: {
    type: Boolean,
    default: false,
    name: '线条平滑显示',
    filedType: 'switch'
  },
  isBarStack: {
    type: Boolean,
    default: false,
    name: '左Y轴堆叠',
    filedType: 'switch'
  },
  isBarStackr: {
    type: Boolean,
    default: false,
    name: '右Y轴堆叠',
    filedType: 'switch'
  },


  yLabel: {
    type: String,
    default: '',
    name: '左坐标轴单位',
    filedType: 'string'
  },
  yLabel1: {
    type: String,
    default: '',
    name: '右坐标轴单位',
    filedType: 'string'
  },
  yName: {
    type: String,
    default: '',
    name: '左坐标轴标题',
    filedType: 'string'
  },
  yName1: {
    type: String,
    default: '',
    name: '右坐标轴标题',
    filedType: 'string'
  },


  barMaxWidth: {
    type: String,
    default: '50%',
    name: '柱子最大宽度',
    filedType: 'string'
  },


  yNamePadding: {
    type: String,
    default: '',
    name: '左Y轴名称位置偏移',
    filedType: 'string'
  },
  yNamePadding1: {
    type: String,
    default: '',
    name: '右Y轴名称位置偏移',
    filedType: 'string'
  },
  xLabelRotate: {
    type: String,
    default: '0',
    name: 'X坐标旋转角度',
    filedType: 'string'
  },
  yLabelRotate: {
    type: String,
    default: '0',
    name: 'Y坐标旋转角度',
    filedType: 'string'
  },

  grcolors: {
    type: Array,
    default () {
      return [
        '#4ac7ff',
        '#96e388',
        '#4ac7ff',
        '#2bd3bd',
        '#96e388',
        '#fecd63',
        '#4ac7ff',
        '#2bd3bd',
        '#96e388',
        '#fecd63'
      ]
    },
    name: '渐变色调色板',
    nameTip: '图表按此处指定的值循环取色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 30
  },
  isGradientsBar: {
    type: Boolean,
    default: false,
    name: '是否柱子渐变色',
    filedType: 'switch'
  },
  isGraBarMulColor: {
    type: Boolean,
    default: false,
    name: '每个柱子渐变色相同',
    filedType: 'switch'
  },
  barStyleWidth: {
    type: String,
    default: '0',
    name: '柱子顶部圆角',
    filedType: 'string'
  },
  barBorderWidth: {
    type: String,
    default: '',
    name: '描边线宽',
    filedType: 'string'
  },

  showBarLabel: {
    type: Boolean,
    default: false,
    name: '显示柱子标签',
    filedType: 'switch'
  },
  barLabelPosition: {
    type: String,
    default: 'top',
    name: '柱子标签位置',
    filedType: 'string'
  },
  barLabelFontSize: {
    type: String,
    default: '16',
    name: '柱子标签字体',
    filedType: 'string'
  },
  barLabelColor: {
    type: String,
    default: '',
    name: '柱子标签颜色',
    filedType: 'color'
  },
  lineType: {
    type: String,
    default: 'solid',
    name: '线条类型',
    filedType: 'select',
    options: [
      {
        name: 'solid',
        value: 'solid'
      },
      {
        name: 'dotted',
        value: 'dotted'
      },
      {
        name: 'dashed',
        value: 'dashed'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },
  useSeries: {
    type: Boolean,
    default: false,
    name: '启用定制series',
    filedType: 'switch'
  },
  funcSeries: {
    type: Function,
    default: '',
    name: '定制series函数',
    filedType: 'function'
  },
  extendOption: {
    type: Boolean,
    default: false,
    name: '扩展定制option',
    filedType: 'switch'
  },
  funcExtOption: {
    type: Function,
    default: '',
    name: '扩展定制option函数',
    filedType: 'function'
  },

  ...nodata
}
